using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;

namespace PBR
{
    /// <summary>
    /// Contains and retrieves all brushes in the scene
    /// </summary>
    public class PBRBrush : IConvertToXml
    {
        #region Constant Variables

        public const int NUMBRUSHES = 7;

        #endregion

        #region Member Variables

        /// <summary>
        /// All the brushes in the scene
        /// </summary>
        public BrushMipMap[] ColorBrushes;
        public BrushMipMap[] HeightBrushes;

        #endregion

        #region Member Functions

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="paths">2D array with all the relevant brush paths</param>
        public PBRBrush(string [] colorPaths, string[] heightPaths)
        {
            if (colorPaths.Length != NUMBRUSHES)
            {
                throw new ArgumentException("paths must have length NUMBRUSHES");
            }
            if (heightPaths.Length != NUMBRUSHES)
            {
                throw new ArgumentException("paths must have length NUMBRUSHES");
            }

            ColorBrushes = new BrushMipMap[NUMBRUSHES];
            for (int i = 0; i < NUMBRUSHES; i++)
            {
                ColorBrushes[i] = new BrushMipMap(colorPaths[i]);
            }

            HeightBrushes = new BrushMipMap[NUMBRUSHES];
            for (int i = 0; i < NUMBRUSHES; i++)
            {
                HeightBrushes[i] = new BrushMipMap(heightPaths[i]);
            }
            
        }

        public void ConvertToXml(XmlElement root, XmlDocument doc)
        {

        }

        #endregion

        #region Properties

        #endregion
    }
}
